home *** CD-ROM | disk | FTP | other *** search
- /* ===================
- * AEATokenDescList.cc
- * ===================
- */
-
- #include "AEADebugging.h"
-
- #include <Errors.h>
-
- #include "AEAMetatoken.hh"
- #include "AEATokenDescList.hh"
-
-
- AEATokenDescList::AEATokenDescList(AEDesc inAEDesc)
- {
- mDescList.Duplicate(inAEDesc);
- }
-
- AEATokenDescList::~AEATokenDescList()
- {
- }
-
- void
- AEATokenDescList::MakeDataDescriptor(AEDesc &outAEDesc)
- {
- if (mDescList.DescriptorType() == typeAEList) {
- // create output list
- AEADescList list;
-
- list.Create();
-
- long count = mDescList.CountItems();
- for (int i = 1; i <= count; i++) {
- AEADesc item;
- mDescList.Get(i, item.Ref());
- // make a descriptor for item
- AEAMetatoken token(item.Ref());
- AEADesc desc;
- token.Ref().MakeDataDescriptor(desc.Ref());
- // add it to the list
- list.Put(0, desc.Ref());
- // dispose of anything
- }
- outAEDesc = list.Ref();
- list.Reset();
- } else {
- ThrowOSErr_(errAEEventNotHandled);
- }
- }
-